const express = require("express");
const fs = require("fs");
const path = require("path");

const router = express.Router();

router.get("/getCompayList",(req,res)=>{
    try {
        let companyList = fs.readFileSync(path.join(__dirname,"../jsonData/companyList.json"));
        res.send(JSON.parse(companyList));
    } catch (error) {
        res.status(404).send(error);
    }
});

module.exports = router;